/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package net.worlds.object;

import java.awt.Cursor;
import net.worlds.WorldsException;
import net.worlds.Main;
import net.worlds.ui.UI;


public class RotateTool extends Tool{
    public RotateTool() throws WorldsException
    {
        super("RotateTool");
    }
    @Override
    public void selected()
    {
        if(!Main.noView)
        {
            UI.mouseMode = UI.MODE_ROTATE;
            UI.setCursor(Cursor.getDefaultCursor());
            UI.setMouseImage("rotate");
        }
    }
    @Override
    public void deselected()
    {
        try {
            if(!Main.noView)
                UI.clearSelection(false);
        } catch (WorldsException ex) {
            ex.printStackTrace();
        }
        UI.clearMouseMode();
    }
}

/*
link(script.Parent.Selected, function() print("S") end)
link(script.Parent.Deselected, function() print("d") end)
link(script.Parent.MouseDown, function(b, p) print(b); print(p); end)
link(script.Parent.MouseUp, function(p) print(p) end)
 */